`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: 
// Engineer: 
// 
// Create Date:    12:13:15 04/05/2011 
// Design Name: 
// Module Name:    InstrMem 
// Project Name: 
// Target Devices: 
// Tool versions: 
// Description: 
//
// Dependencies: 
//
// Revision: 
// Revision 0.01 - File Created
// Additional Comments: 
//
//////////////////////////////////////////////////////////////////////////////////
module InstrMem(clk, addr, instr, reset);
    input clk;
	 input [7:0] addr;
	 input reset;
    output [15:0] instr;

	reg [15:0] instr;
	reg [15:0] ProgramMemory [0:255];
	
	always @ (addr)
	begin
		instr <= ProgramMemory[addr];
	end
/*	
	always @ (posedge reset) 
	begin
		ProgramMemory[8'd0] <= 16'hAA40;
		ProgramMemory[8'd1] <= 16'hAB10;
		ProgramMemory[8'd2] <= 16'hAF08;
		ProgramMemory[8'd3] <= 16'h6BFB;
		ProgramMemory[8'd4] <= 16'hAF10;
		ProgramMemory[8'd5] <= 16'h4BFB;
		ProgramMemory[8'd6] <= 16'hAC0F;
		ProgramMemory[8'd7] <= 16'hADF0;
		ProgramMemory[8'd8] <= 16'hAE00;
		ProgramMemory[8'd9] <= 16'hA810;
		ProgramMemory[8'd10] <= 16'hA905;
		ProgramMemory[8'd11] <= 16'hA700;
		ProgramMemory[8'd12] <= 16'h990F;
		ProgramMemory[8'd13] <= 16'hDF21;
		ProgramMemory[8'd14] <= 16'h0000;
		ProgramMemory[8'd15] <= 16'h0000;
		ProgramMemory[8'd16] <= 16'h0000;
		ProgramMemory[8'd17] <= 16'hAF01;
		ProgramMemory[8'd18] <= 16'h29F9;
		ProgramMemory[8'd19] <= 16'hB800;
		ProgramMemory[8'd20] <= 16'h160E;
		ProgramMemory[8'd21] <= 16'hAF01;
		ProgramMemory[8'd22] <= 16'hA708;
		ProgramMemory[8'd23] <= 16'h6F7F;
		ProgramMemory[8'd24] <= 16'hA700;
		ProgramMemory[8'd25] <= 16'h9FEF;
		ProgramMemory[8'd26] <= 16'hDF0A;
		ProgramMemory[8'd27] <= 16'h0000;
		ProgramMemory[8'd28] <= 16'h0000;
		ProgramMemory[8'd29] <= 16'h0000;
		ProgramMemory[8'd30] <= 16'hAF03;
		ProgramMemory[8'd31] <= 16'h7AFA;
		ProgramMemory[8'd32] <= 16'h4BAB;
		ProgramMemory[8'd33] <= 16'hAFFF;
		ProgramMemory[8'd34] <= 16'hA708;
		ProgramMemory[8'd35] <= 16'h6F75;
		ProgramMemory[8'd36] <= 16'hCA00;
		ProgramMemory[8'd37] <= 16'hE02C;
		ProgramMemory[8'd38] <= 16'hAF02;
		ProgramMemory[8'd39] <= 16'h6CFC;
		ProgramMemory[8'd40] <= 16'h5C0F;
		ProgramMemory[8'd41] <= 16'h3DFD;
		ProgramMemory[8'd42] <= 16'hA5FF;
		ProgramMemory[8'd43] <= 16'hC800;
		ProgramMemory[8'd44] <= 16'hAF02;
		ProgramMemory[8'd45] <= 16'h18F8;
		ProgramMemory[8'd46] <= 16'hE00B;
		ProgramMemory[8'd47] <= 16'h0000;
		ProgramMemory[8'd48] <= 16'h0000;
		ProgramMemory[8'd49] <= 16'h0000;
	end
	*/
/*
li $s0, 40hex 							16'hAA40
li $s1, 10hex							16'hAB10
li $t1, 8								16'hAF08
sl $s1, $s1, $t1						16'h6BFB
li $t1, 10hex							16'hAF10
or $s1, $s1, $t1 						16'h4BFB
li $s2, 0Fhex 							16'hAC0F
li $s3, F0hex 							16'hADF0
li $t0, 00hex 							16'hAE00
li $a0, 10hex 							16'hA810
li $a1, 05hex 							16'hA905
BegWhile:		li $b, 0				16'hA700
sgt $t1, $a1, $zero					16'h990F
beb $t1, EndWhile						16'hDF21
nop										16'h0000
nop										16'h0000
nop										16'h0000
li $t1, 1								16'hAF01
sub $a1, $a1, $t1						16'h29F9
lw $a0(0)								16'hB800
add $t0, $mr, $zero					16'h160E
li $t1, 1hex							16'hAF01
li $b, 8									16'hA708
sl $t1, $t1, $b						16'h6F7F
li $b, 0									16'hA700
sgt $t1, $t0, $t1						16'h9FEF
beb $t1, Else							16'hDF0A
nop										16'h0000
nop										16'h0000
nop										16'h0000
li $t1, 3								16'hAF03
sr $s0, $s0, $t1						16'h7AFA
or $s1, $s1, $s0						16'h4BAB
li $t1, FFhex							16'hAFFF
li $b, 8									16'hA708
sl $mt, $t1, $b						16'h6F75
sw $a0(0)								16'hCA00
j EndIf									16'hE02C
Else:			li $t1, 2				16'hAF02
			sl $s2, $s2, $t1			16'h6CFC
			nor $t1, $s2, $zero		16'h5C0F
			and $s3, $s3, $t1			16'h3DFD
			li $mt, FFhex				16'hA5FF
			sw $a0(0)					16'hC800
EndIf:		li $t1, 2				16'hAF02
			add $a0, $a0, $t1			16'h18F8
			j BegWhile					16'hE00B
nop										16'h0000
nop										16'h0000
nop										16'h0000								
*/

endmodule
